<#include "../common/layout.ftl"/>
<@layout>
<div class="well">
		<#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
			<a class="btn btn-success" href="/newOrder/addDeliveryPrice/${cityId}"><i class="icon-user icon-white"></i>添加配送价格</a>
		</#if>
  </div>
<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
			<th>规则id</th>
			<th>起步价</th>
			<th>起步价公里数</th>
			<th>超过多少公里</th>
			<th>超过起步公里每超过对应公里加多少钱</th>
			<th>起步公斤数</th>
			<th>超过公斤数每公斤加多少钱</th>
			<th>操作</th>
		  </tr>
		</thead>
		<tbody>
		<#list deliveryPriceList as deliveryPrice>
		  <tr>
			<td>
			   ${deliveryPrice.delivery_id!""}
			</td>
			<td>
			  ${deliveryPrice.initialPrice!""}
			</td>
			<td>
			  ${deliveryPrice.initialKm!""}
			</td>
			<td>
			  ${deliveryPrice.overKm!""}
			</td>
			<td>
			  ${deliveryPrice.overPlusPrice!""}
			</td>
			<td>
			  ${deliveryPrice.initialWeight!""}
			</td>
			<td>
			  ${deliveryPrice.overPlusWeightPrice!""}
			</td>
			<td>
				<div class="btn-group">
					 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
					 	<a class="btn btn-primary" href="/newOrder/editDeliveryPrice/${deliveryPrice.delivery_id}"><i class="icon-info-sign icon-white"></i> 修 改</a>
					 </#if>
					 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
					 	<a class="btn btn-primary" href="/newOrder/deleteDeliveryPrice/${deliveryPrice.delivery_id}?cityId=${deliveryPrice.city_id}"><i class="icon-trash icon-white"></i> 删 除</a>
					 </#if>
				</div>
			</td>
		  </tr>
		</#list>
		</tbody>
	</table>  
</div>
          
</@layout>